home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / etc / network / if-up.d / 000resolvconf next >
Encoding:
Text File  |  2010-07-12  |  651 b   |  37 lines

  1. #!/bin/sh
  2. #
  3. # ifup hook script for resolvconf
  4. #
  5. # Licensed under the GNU GPL.  See /usr/share/common-licenses/GPL.
  6. #
  7. # History
  8. # June 2003: Written by Thomas Hood <jdthood@yahoo.co.uk>
  9. #            with help from Chris Hanson
  10.  
  11. [ -x /sbin/resolvconf ] || exit 0
  12.  
  13. case "$ADDRFAM" in
  14.     inet|inet6) : ;;
  15.     *) exit 0 ;;
  16. esac
  17.  
  18. R=""
  19. if [ "$IF_DNS_DOMAIN" ] ; then
  20.     R="${R}domain $IF_DNS_DOMAIN
  21. "
  22. fi
  23. if [ "$IF_DNS_SEARCH" ] ; then
  24.     R="${R}search $IF_DNS_SEARCH
  25. "
  26. fi
  27. if [ "$IF_DNS_SORTLIST" ] ; then
  28.     R="${R}sortlist $IF_DNS_SORTLIST
  29. "
  30. fi
  31. for NS in $IF_DNS_NAMESERVERS ; do
  32.     R="${R}nameserver $NS
  33. "
  34. done
  35. echo -n "$R" | /sbin/resolvconf -a "${IFACE}.${ADDRFAM}"
  36.  
  37.